import backgroundImage from "@/assets/images/bg.jpg"
import {MyLogin} from "./components/login"
import {MyRegister} from "./components/register"
import {useState} from "react";
import "./index.scss"

export function LoginPage() {

    const [isLogin, setIsLogin] = useState<boolean>(true)
    function changeActive(){
        setIsLogin(!isLogin)
    }
    return (
        <div className="login" style={{backgroundImage: `url(${backgroundImage})`}}>
            <div className={`login_left ${isLogin ? "unActive" : "active"}`}>
                <MyRegister changeActive={changeActive}/>
            </div>
            <div className={`login_right ${isLogin ? "active" : "unActive"}`}>
                <MyLogin changeActive={changeActive}/>
            </div>
        </div>
    )

}
